<#assign p = p!0>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <#include "/common/common_head.ftl">
  </head>

  <body style="padding-top:0px;'>

 		<!-- 主内容区域 S -->
 		<div class="" id="mainBoard">
		<!-- 导航路径 S -->
		<ol class="breadcrumb">
		  <li><a href="#">菜单管理</a></li>
		  <li class="active">菜单列表</li>
		</ol>
		<!-- 导航路径 E -->

		<!-- 标题区 S -->
		<h2 class="sub-header">菜单列表</h2>
		<!-- 标题区 E -->

        <!-- 操作区 S -->
        <div class="container-fluid">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="getMenu.do">添加菜单</a></li>
          </ul>
        </div>
        <!-- 操作区 E -->

        <!-- 内容区 S -->

		<div class="table-responsive">
        	<table class="table table-striped" id="categoryTable">
              <thead>
                <tr>
                  <th>菜单编号(id)</th>
                  <th>菜单名称(name)</th>
                  <th>菜单地址(jurl)</th>
                  <th>隐藏属性</th>
                  <th>描述</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
              <#if menus??>
              <#list menus as menu >
                <tr>
                  <td>${menu.id?if_exists}</td>
                  <td>${menu.name?if_exists}</td>
                  <td>${menu.jurl?if_exists}</td>
                  <td>
                    <#if menu.hidden == 0>
                      正常
                    <#else>
                      隐藏
                    </#if>
                  </td>
                  <td>${menu.description?if_exists}</td>
                  <td>
                    View,
                    <#if __USER__.type == -1>
                    <a href="deleteMenu.do?id=${menu.id?if_exists}">Del</a>,
                    <a href="getMenu.do?id=${menu.id?if_exists}">Edit</a>
                    </#if>
                  </td>
                </tr>
                <#list menu.children as sub>
                    <tr>
                      <td>${sub.id?if_exists}</td>
                      <td><span style="margin-left:30px;"></span>|---> ${sub.name?if_exists}</td>
                      <td>${sub.jurl?if_exists}</td>
                      <td>
                        <#if sub.hidden == 0>
                          正常
                        <#else>
                          隐藏
                        </#if>
                      </td>
                      <td>${sub.description?if_exists}</td>
                      <td>
                        View,
                        <a href="deleteMenu.do?id=${sub.id?if_exists}">Del</a>,
                        <a href="getMenu.do?id=${sub.id?if_exists}">Edit</a>
                      </td>
                    </tr>

                    <#list sub.children as subsub>
                        <tr>
                          <td>${subsub.id?if_exists}</td>
                          <td><span style="margin-left:60px;"></span><span class="label label-success">${subsub.name?if_exists}</span></td>
                          <td>${subsub.jurl?if_exists}</td>
                          <td>
                            <#if subsub.hidden == 0>
                              正常
                            <#else>
                              隐藏
                            </#if>
                          </td>
                          <td>${subsub.description?if_exists}</td>
                          <td>
                            View,
                            <a href="deleteMenu.do?id=${subsub.id?if_exists}">Del</a>,
                            <a href="getMenu.do?id=${subsub.id?if_exists}">Edit</a>
                          </td>
                        </tr>
                    </#list>

                </#list>
               </#list>
               </#if>
              </tbody>
        	</table>
        </div>

		<!-- 内容区 E -->
 		<!-- 主内容区域 E -->

  </body>
</html>
